package com.subsequent.mapper;

import com.subsequent.entity.DepartmentPharmacyConfig;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface DepartmentPharmacyConfigMapper {
    List<DepartmentPharmacyConfig> selectByCondition(
        @Param("name") String name,
        @Param("level") String level,
        @Param("pharmacy") String pharmacy,
        @Param("status") String status,
        @Param("parentId") Integer parentId,
        @Param("startDate") Date startDate,
        @Param("endDate") Date endDate,
        @Param("offset") int offset,
        @Param("pageSize") int pageSize
    );

    int countByCondition(
        @Param("name") String name,
        @Param("level") String level,
        @Param("pharmacy") String pharmacy,
        @Param("status") String status,
        @Param("parentId") Integer parentId,
        @Param("startDate") Date startDate,
        @Param("endDate") Date endDate
    );

    int insert(DepartmentPharmacyConfig config);

    int updateById(DepartmentPharmacyConfig config);

    int deleteById(@Param("id") Integer id);

    DepartmentPharmacyConfig selectById(@Param("id") Integer id);
}